﻿@{

}
@model liaowa2.Entity.DataModel.ManagerRole
<script type="text/javascript">
        $(function () {
            //初始化表单验证
            $("#form1").initValidform();
            //是否启用权限
            if ($("#ddlRoleType").find("option:selected").attr("value") == 1) {
                $(".border-table").find("input[type='checkbox']").prop("disabled", true);
            }
            $("#ddlRoleType").change(function () {
                if ($(this).find("option:selected").attr("value") == 1) {
                    $(".border-table").find("input[type='checkbox']").prop("checked", false);
                    $(".border-table").find("input[type='checkbox']").prop("disabled", true);
                } else {
                    $(".border-table").find("input[type='checkbox']").prop("disabled", false);
                }
            });
            //权限全选
            $("input[name='checkAll']").click(function () {
                if ($(this).prop("checked") == true) {
                    $(this).parent().siblings("td").find("input[type='checkbox']").prop("checked", true);
                } else {
                    $(this).parent().siblings("td").find("input[type='checkbox']").prop("checked", false);
                }
            });
        });
</script>
<form method="post" action="/ManagerRole/Update" id="form1">
    <!--导航栏-->
    <div class="location">
        <a href="/ManagerRole/List" class="back"><i></i><span>返回列表页</span></a>
        <a href="/home/center" class="home"><i></i><span>首页</span></a>
        <i class="arrow"></i>
        <a href="/Manager/List"><span>管理员</span></a>
        <i class="arrow"></i>
        <a href="/ManagerRole/List"><span>管理角色</span></a>
        <i class="arrow"></i>
        <span>编辑角色</span>
    </div>
    <div class="line10"></div>
    <!--/导航栏-->
    <!--内容-->
    <div id="floatHead" class="content-tab-wrap" style="height: 42px;">
        <div class="content-tab" style="width: 1139px; position: static; top: 52px;">
            <div class="content-tab-ul-wrap">
                <div class="tab-title"><span>角色信息</span><i></i></div><ul>
                    <li><a class="selected" href="javascript:;">角色信息</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="tab-content">
        <dl>
            @Html.Hidden("id", Model.id)
            <dt>角色类型</dt>
            <dd>
                <div class="rule-single-select single-select">
                    <div class="boxwrap"><a class="select-tit" href="javascript:;"><span>请选择类型...</span><i></i></a><div class="select-items"><ul><li class="selected">请选择类型...</li><li>系统用户</li></ul></div><i class="arrow"></i></div>
                    <select name="ddlRoleType" id="ddlRoleType" datatype="*" errormsg="请选择角色类型！" sucmsg=" " style="display: none;">
                        <option value="">请选择类型...</option>
                        @liaowa2.Web.MenuHelper.HtmlHelp.ManagerRoleType(Model.role_type)
                    </select>
                </div>
            </dd>
        </dl>
        <dl>
            <dt>角色名称</dt>
            <dd><input name="txtRoleName" type="text" id="txtRoleName" value="@Model.role_name" class="input normal" datatype="*1-100" sucmsg=" "> <span class="Validform_checktip">*角色中文名称，100字符内</span></dd>
        </dl>
        <dl>
            <dt>管理权限</dt>
            <dd>
                <table border="0" cellspacing="0" cellpadding="0" class="border-table" width="98%">
                    <thead>
                        <tr>
                            <th width="30%">导航名称</th>
                            <th>权限分配</th>
                            <th width="10%">全选</th>
                        </tr>
                    </thead>
                    <tbody>
                        @liaowa2.Web.MenuHelper.HtmlHelp.ManagerRoleList(Model.id)
                    </tbody>
                </table>
            </dd>
        </dl>
    </div>
    <!--/内容-->
    <!--工具栏-->
    <div class="page-footer">
        <div class="btn-wrap" style="position: fixed;">
            <input type="submit" name="btnSubmit" value="提交保存" id="btnSubmit" class="btn">
            <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript:history.back(-1);">
        </div>
    </div>
    <!--/工具栏-->
</form>
